import logging
from fastapi import FastAPI
from .database import engine

async def shutdown():
    logging.info("Shutting down database...")
    async with engine.begin() as conn:
        await conn.run_sync(engine.dispose)